(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/home/components/vehicle-length-std/index" ], {
    "17bc": function(e, t, a) {
        a.r(t);
        var n = a("86ca"), i = a("a98b");
        for (var l in i) [ "default" ].indexOf(l) < 0 && function(e) {
            a.d(t, e, function() {
                return i[e];
            });
        }(l);
        a("5a3f");
        var r = a("f0c5"), u = Object(r.a)(i.default, n.b, n.c, !1, null, "41a35ed3", null, !1, n.a, void 0);
        t.default = u.exports;
    },
    "2a77": function(e, t, a) {},
    "5a3f": function(e, t, a) {
        var n = a("2a77");
        a.n(n).a;
    },
    "5cad": function(e, t, a) {
        (function(e) {
            var n = a("4ea4").default;
            Object.defineProperty(t, "__esModule", {
                value: !0
            }), t.default = void 0;
            var i = n(a("ded3")), l = n(a("278c")), r = n(a("448a")), u = n(a("6374")), d = n(a("2de2")), c = a("48b8"), o = a("8f12"), v = a("1b37"), f = a("8f93"), s = a("fd0e"), m = a("665c"), h = n(a("0613")), _ = a("05dc"), g = a("cee8"), p = a("2ef4"), b = a("d19a"), x = a("7a9b"), S = {};
            S.props = {
                bigCarConfig: {
                    type: Object,
                    default: function() {
                        return {};
                    }
                }
            }, S.setup = function(t, a) {
                var n = t, S = a.emit;
                (0, s.onBeforeMount)(function() {
                    S("loaded", {
                        handleStd: ee,
                        init: Y
                    });
                });
                var C = {}, y = (0, s.ref)([]), I = (0, s.ref)({}), w = (0, m.useState)(), O = w.selectedHomeBigVehicle, V = w.selectedService, E = w.serviceList, N = (0, 
                m.useGetters)(), k = N.lhVehicleList, M = N.bigCarVehicles, T = N.bigCarVehicleConfig, A = N.startAddress, j = N.commonStatisticsState, B = N.bigVehicleModule, H = (0, 
                s.computed)(function() {
                    return E.value.findIndex(function(e) {
                        return 21 === Number(e.service_type);
                    }) > -1;
                }), L = (0, s.computed)(function() {
                    var e, t = 82, a = 0, n = (0, u.default)(Q.value);
                    try {
                        for (n.s(); !(e = n.n()).done; ) {
                            var i = e.value;
                            a += 28 * (i.short_name || i.name).length + 64;
                        }
                    } catch (e) {
                        e = VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL.handleException(e);
                        n.e(e);
                    } finally {
                        n.f();
                    }
                    return a > 630 && (t = 82 * Math.ceil(a / 630)), t;
                }), U = (0, s.computed)(function() {
                    return y.value.findIndex(function(e) {
                        return e.isCarriage;
                    });
                }), F = (0, s.computed)(function() {
                    var e;
                    return null === (e = n.bigCarConfig) || void 0 === e ? void 0 : e.is_show_ckg;
                }), P = (0, s.computed)(function() {
                    var e, t;
                    return !(null !== (e = T.value) && void 0 !== e && e.show_big_car_custom_vehicle_item) && (null === (t = I.value) || void 0 === t ? void 0 : t.name) && 2 !== F.value && (D.value.carriageWeight || D.value.carriageVolume);
                }), $ = (0, s.computed)(function() {
                    return k.value.findIndex(function(e) {
                        var t, a;
                        return e.standard_order_vehicle_id === (null === (t = I.value) || void 0 === t ? void 0 : t.standard_order_vehicle_id) && e.order_vehicle_id === (null === (a = I.value) || void 0 === a ? void 0 : a.order_vehicle_id);
                    });
                });
                function J(e) {
                    return "cityChange" === (null == e ? void 0 : e.bigCarFrom);
                }
                (0, s.computed)(function() {
                    var e = h.default.getters.vehicleList.findIndex(function(e) {
                        return 1 === Number(e.is_big_vehicle) && 1 === Number(e.vehicle_attr);
                    });
                    return e < 0 && (e = 0), e;
                });
                var D = (0, s.computed)(function() {
                    var e, t = {
                        carriageWeight: "",
                        carriageVolume: "",
                        len: "",
                        wid: "",
                        hei: "",
                        cubeUnit: ""
                    }, a = (null === (e = I.value) || void 0 === e ? void 0 : e.vehicle_size) || [];
                    (0, c.isArray)(a) || (a = []);
                    var n, i = (0, u.default)(a);
                    try {
                        for (i.s(); !(n = i.n()).done; ) {
                            var l = n.value;
                            if (l.min = l.min ? l.min : 0, l.max = l.max ? l.max : 0, "carriage_weight" === l.field || "carriage_volume" === l.field) {
                                l.min = Number.parseInt(String(l.min)), l.max = Number.parseInt(String(l.max));
                                var r = "";
                                l.min && l.max ? r = "".concat(l.min, "~").concat(l.max, " ").concat(l.unit) : l.max ? r = "".concat(l.max, " ").concat(l.unit) : l.min && (r = "".concat(l.min, " ").concat(l.unit)), 
                                "carriage_weight" === l.field && (t.carriageWeight = r), "carriage_volume" === l.field && (t.carriageVolume = r);
                            }
                            if ("carriage_length" === l.field || "carriage_width" === l.field || "carriage_height" === l.field) {
                                l.min = Number(Number(l.min).toFixed(1)), l.max = Number(Number(l.max).toFixed(1));
                                var d = l.min ? l.min : l.max ? l.max : "";
                                "carriage_length" === l.field && (t.len = String(d), t.cubeUnit = l.unit), "carriage_width" === l.field && (t.wid = String(d)), 
                                "carriage_height" === l.field && (t.hei = String(d));
                            }
                        }
                    } catch (e) {
                        e = VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL.handleException(e);
                        i.e(e);
                    } finally {
                        i.f();
                    }
                    return t;
                }), W = (0, s.computed)(function() {
                    var e, t, a = (null === (e = I.value) || void 0 === e || null === (t = e.vehicle_std_item) || void 0 === t ? void 0 : t.filter(function(e) {
                        return !!e.is_checked;
                    })) || [];
                    return a.every(function(e) {
                        return !!e.img;
                    }) ? a : [];
                }), z = (0, s.computed)(function() {
                    return O.value.replaceNameNew ? O.value.replaceNameNew : O.value.name;
                }), R = (0, s.computed)(function() {
                    var e;
                    return (null === (e = T.value) || void 0 === e ? void 0 : e.first_big_car_tip) || "";
                }), q = (0, s.computed)(function() {
                    var e;
                    return (null === (e = I.value) || void 0 === e ? void 0 : e.vehicle_std_item) || [];
                }), G = (0, s.computed)(function() {
                    return q.value.filter(function(e) {
                        return e.frontEndActive;
                    });
                }), K = (0, s.computed)(function() {
                    return q.value.length > 4 && !I.value.showMore;
                }), Q = (0, s.computed)(function() {
                    var e, t = q.value;
                    return null !== (e = I.value) && void 0 !== e && e.showMore || q.value.length < 5 ? t : [].concat((0, 
                    r.default)(null == t ? void 0 : t.slice(0, 4)), [ {
                        name: "更多",
                        short_name: ""
                    } ]);
                });
                (0, s.watch)(function() {
                    return M.value;
                }, function(e, t) {
                    var a, n = !(0, c.isEqual)(e, t) && (null == t ? void 0 : t.length) > 0, i = (0, 
                    c.cloneDeep)(e) || [], r = (0, u.default)(i);
                    try {
                        for (r.s(); !(a = r.n()).done; ) {
                            var d = a.value;
                            d.showMore = !1;
                            var o, v = (0, u.default)(null == d ? void 0 : d.vehicle_std_item.entries());
                            try {
                                for (v.s(); !(o = v.n()).done; ) {
                                    var f = (0, l.default)(o.value, 2);
                                    (f[0], f[1]).frontEndActive = !1;
                                }
                            } catch (e) {
                                e = VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL.handleException(e);
                                v.e(e);
                            } finally {
                                v.f();
                            }
                        }
                    } catch (e) {
                        e = VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL.handleException(e);
                        r.e(e);
                    } finally {
                        r.f();
                    }
                    y.value = i;
                    var s = E.value.findIndex(function(e) {
                        return 5 === Number(e.service_type);
                    });
                    (null == i || !i.length) && s >= 0 && (0, p.addPlaceOrderError)(p.OrderProcessErrorCode.vehicleTypeListEmpty);
                    var m = {};
                    if (n) {
                        var h, _ = O.value, g = _.standard_order_vehicle_id, b = void 0 === g ? "" : g, x = _.name, S = void 0 === x ? "" : x, C = _.vehicle_std_item, I = void 0 === C ? [] : C, w = null === (h = y.value) || void 0 === h ? void 0 : h.find(function(e) {
                            return e.standard_order_vehicle_id === b && e.name === S;
                        });
                        m.bigCarFrom = "cityChange", m.bigCar = w, m.vehicleStdItem = I;
                    }
                    Y(m);
                }, {
                    immediate: !0,
                    deep: !0
                }), (0, s.watch)(function() {
                    return V.value;
                }, function(e, t) {
                    5 === e && Y();
                });
                var X = !1;
                function Y(t) {
                    if (C = t || {}, !X && y.value.length > 0) {
                        var a = (0, v.getMatchCar)(5);
                        I.value = y.value.find(function(e) {
                            return e.name === a;
                        }) || {}, X = !0, I.value, "bigCar" === e.getStorageSync(o.COMMON.USER_CHOOSE_TAB) && (0, 
                        _.statistics)("homepage_largetrucks_expo", (0, i.default)((0, i.default)({}, h.default.getters.commonStatisticsState), {}, {
                            page_from: "启动"
                        }));
                    }
                    var n;
                    if (C.bigCar && !J(C) && le(C), J(C)) if (!C.bigCar && null !== (n = O.value) && void 0 !== n && n.standard_order_vehicle_id) {
                        ne("".concat(A.value.city_name, "没有").concat(z.value, "，请重新选择车长车型 "));
                    } else C.bigCar && le(C);
                    (0, s.nextTick)(function() {
                        var e = C.vehicleStdItem;
                        if ((null == e ? void 0 : e.length) > 0 || "detail" === C.from) {
                            var t, a, n = [], i = (null === (t = I.value) || void 0 === t ? void 0 : t.vehicle_std_item) || [], l = (0, 
                            u.default)(i);
                            try {
                                for (l.s(); !(a = l.n()).done; ) {
                                    a.value.frontEndActive = !1;
                                }
                            } catch (e) {
                                e = VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL.handleException(e);
                                l.e(e);
                            } finally {
                                l.f();
                            }
                            var r, d = (0, u.default)(e);
                            try {
                                for (d.s(); !(r = d.n()).done; ) {
                                    var c = r.value;
                                    c.frontEndActive && n.push(c);
                                    var o, v = (0, u.default)(i);
                                    try {
                                        for (v.s(); !(o = v.n()).done; ) {
                                            var f = o.value;
                                            c.frontEndActive && f.name === c.name && (f.frontEndActive = !0);
                                        }
                                    } catch (e) {
                                        e = VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL.handleException(e);
                                        v.e(e);
                                    } finally {
                                        v.f();
                                    }
                                }
                            } catch (e) {
                                e = VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL.handleException(e);
                                d.e(e);
                            } finally {
                                d.f();
                            }
                            i.findIndex(function(t) {
                                var a;
                                return t.name === (null === (a = e[e.length - 1]) || void 0 === a ? void 0 : a.name);
                            }) > 4 && te();
                            var s = n.filter(function(e) {
                                return !i.some(function(t) {
                                    return t.name === e.name;
                                });
                            }).map(function(e) {
                                return e.short_name ? e.short_name : e.name;
                            }), m = "".concat(z.value, "没有").concat(s.join("、"), "，请重新选择车长车型");
                            s.length > 0 && ne(m);
                        }
                        Z();
                    }), y.value.findIndex(function(e) {
                        var t, a;
                        return e.standard_order_vehicle_id === (null === (t = I.value) || void 0 === t ? void 0 : t.standard_order_vehicle_id) && e.name === (null === (a = I.value) || void 0 === a ? void 0 : a.name);
                    }) < 0 && (I.value = y.value[0]), h.default.commit("setState", {
                        selectedHomeBigVehicle: I.value || {}
                    });
                    var l = k.value.findIndex(function(e) {
                        var t, a;
                        return e.standard_order_vehicle_id === (null === (t = I.value) || void 0 === t ? void 0 : t.standard_order_vehicle_id) && e.order_vehicle_id === (null === (a = I.value) || void 0 === a ? void 0 : a.order_vehicle_id);
                    });
                    B.value && !function() {
                        var e, t = getCurrentPages();
                        return "pages/confirm-order/index" === (null == t || null === (e = t[t.length - 1]) || void 0 === e ? void 0 : e.route);
                    }() && S("change-index", {
                        index: l
                    }), ie();
                }
                function Z() {
                    var e, t;
                    null === (e = (0, s.getCurrentInstance)()) || void 0 === e || null === (t = e.proxy) || void 0 === t || t.$forceUpdate();
                }
                function ee() {
                    var e, t = W.value, a = (0, c.cloneDeep)(G.value) || [], n = [], i = (0, u.default)(t);
                    try {
                        for (i.s(); !(e = i.n()).done; ) {
                            var r, d = e.value, o = (0, u.default)(a.entries());
                            try {
                                for (o.s(); !(r = o.n()).done; ) {
                                    var v = (0, l.default)(r.value, 2), f = v[0];
                                    v[1].name === d.name && a.splice(f, 1);
                                }
                            } catch (e) {
                                e = VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL.handleException(e);
                                o.e(e);
                            } finally {
                                o.f();
                            }
                            var s, m = (0, u.default)(G.value);
                            try {
                                for (m.s(); !(s = m.n()).done; ) {
                                    s.value.name === d.name && n.push(d);
                                }
                            } catch (e) {
                                e = VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL.handleException(e);
                                m.e(e);
                            } finally {
                                m.f();
                            }
                        }
                    } catch (e) {
                        e = VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL.handleException(e);
                        i.e(e);
                    } finally {
                        i.f();
                    }
                    h.default.commit("setState", {
                        selectedBigVehicleStd: G.value,
                        selectedStd: a,
                        selectedCar: n
                    });
                }
                function te() {
                    I.value.showMore = !0, I.value;
                }
                function ae() {
                    var e, t = getCurrentPages();
                    return (null == t || null === (e = t[t.length - 1]) || void 0 === e ? void 0 : e.route) === (null === d.default || void 0 === d.default ? void 0 : d.default.homeUrl);
                }
                function ne(e) {
                    var t = ae();
                    setTimeout(function() {
                        var t = ae();
                        B.value && t && (0, g.$toast)({
                            title: e,
                            duration: 3e3
                        });
                    }, t ? 0 : 350);
                }
                function ie() {
                    var e = y.value, t = e.findIndex(function(e) {
                        return e.isCarriage;
                    });
                    if (t > -1 && e.splice(t, 1), P.value) {
                        var a = e.findIndex(function(e) {
                            return e.standard_order_vehicle_id === I.value.standard_order_vehicle_id;
                        }), n = 4 * Math.floor(a / 4) + 4, i = {
                            isCarriage: !0
                        };
                        n > e.length - 1 ? e.push(i) : e.splice(n, 0, i);
                    }
                }
                function le(e) {
                    var t = y.value.findIndex(function(t) {
                        var a;
                        return t.standard_order_vehicle_id === (null === (a = e.bigCar) || void 0 === a ? void 0 : a.standard_order_vehicle_id);
                    });
                    I.value = y.value[t];
                }
                var re = (0, c.throttle)(function(t) {
                    e.navigateTo({
                        url: "/pages/vehicle-detail/index?selectedIndex=".concat($.value)
                    }), (0, _.statistics)("homepage_vehicle_info_click", (0, i.default)((0, i.default)({}, h.default.getters.commonStatisticsState), {}, {
                        module_name: 1 === t ? "车型尺寸" : "箭头"
                    }));
                });
                return Object.assign({
                    bigCarVehiclesHasState: y,
                    currentVehicle: I,
                    calcStdMaxHeight: L,
                    isCarriageIndex: U,
                    isShowVehicleTxt: P,
                    sizeComputed: D,
                    firstBigCarTip: R,
                    currentVehicleStdList: Q,
                    goSmallCarTab: function() {
                        var t, a = (0, v.getMatchCar)(100);
                        if (a && (t = (0, f.findSelectedVehicleListIndex)(a).index)) {
                            var n = k.value.slice(0, t);
                            t = (0, c.findLastIndex)(n, function(e) {
                                return 1 !== e.is_big_vehicle;
                            });
                        }
                        e.setStorageSync(o.COMMON.USER_CHOOSE_TAB, "smallCar"), h.default.commit("setState", {
                            selectedService: 1
                        }), S("back-small", {
                            index: t = t > 0 ? t : 0
                        }), S("change-tab", 1), (0, _.statistics)("homepage_largetrucks_click", (0, i.default)((0, 
                        i.default)({}, h.default.getters.commonStatisticsState), {}, {
                            module_name: R.value
                        })), (0, _.statistics)("homepage_smalltrucks_expo", (0, i.default)((0, i.default)({}, h.default.getters.commonStatisticsState), {}, {
                            page_from: "点击找4米2以下车型"
                        }));
                    },
                    chooseVehicle: function(e) {
                        if (e.standard_order_vehicle_id !== I.value.standard_order_vehicle_id && !e.isCarriage) {
                            x.ConfirmOrderCommit.resetOpenType(), I.value = e, ie(), Z(), h.default.commit("setState", {
                                selectedHomeBigVehicle: I.value,
                                selectedIndex: $.value
                            }), ee(), S("change"), C.bigCarFrom = null;
                            var t = G.value.map(function(e) {
                                return null == e ? void 0 : e.name;
                            }), a = (0, i.default)((0, i.default)({}, j.value), {}, {
                                vehicle_select_name: e.name,
                                vehicle_select_id: e.order_vehicle_id,
                                business_abtest: "业务栏_实验组",
                                is_denoise: 2,
                                module_name: "tab切换车型",
                                vehicle_special_select: t.join(",") || "无"
                            });
                            (0, _.statistics)("homepage_tab_vehicle", a);
                        }
                    },
                    chooseStd: function(e) {
                        var t, a, n, l, r, u, d = Number(null == e || null === (t = e.currentTarget) || void 0 === t ? void 0 : t.dataset.index);
                        if (K.value && d === Q.value.length - 1) return te();
                        x.ConfirmOrderCommit.resetOpenType();
                        var c = (null === (a = I.value) || void 0 === a || null === (n = a.vehicle_std_item) || void 0 === n ? void 0 : n[d]) || {};
                        if (!c.frontEndActive && "冷藏车" === c.name && null !== (l = I.value) && void 0 !== l && l.jump_refrigerated_vehicle && H) {
                            var o, v, s, m = (0, f.findVehicleIndexByStandardId)(null === (o = I.value) || void 0 === o ? void 0 : o.jump_refrigerated_vehicle);
                            h.default.commit("setState", {
                                selectedService: 21,
                                userClickTabType: {
                                    serviceType: 21
                                }
                            }), (0, b.setSelectedIndex)(m);
                            var g = (0, i.default)((0, i.default)({}, j.value), {}, {
                                click_type: "勾选",
                                module_name: null == c ? void 0 : c.name,
                                vehicle_select_name: null === (v = I.value) || void 0 === v ? void 0 : v.name,
                                vehicle_select_id: null === (s = I.value) || void 0 === s ? void 0 : s.order_vehicle_id,
                                vehicle_special_select: null == c ? void 0 : c.name
                            });
                            (0, _.statistics)("homepage_vehicle_models", g);
                        } else {
                            c.frontEndActive = !(null != c && c.frontEndActive), Z(), ee(), S("change");
                            var p = G.value.map(function(e) {
                                return null == e ? void 0 : e.name;
                            }), C = (0, i.default)((0, i.default)({}, j.value), {}, {
                                module_name: null == c ? void 0 : c.name,
                                click_type: null != c && c.frontEndActive ? "勾选" : "取消勾选",
                                vehicle_select_name: null === (r = I.value) || void 0 === r ? void 0 : r.name,
                                vehicle_select_id: null === (u = I.value) || void 0 === u ? void 0 : u.order_vehicle_id,
                                vehicle_special_select: p.join(",") || "无"
                            });
                            (0, _.statistics)("homepage_vehicle_models", C);
                        }
                    },
                    goDetail: re
                }, {
                    handleStd: ee,
                    init: Y
                });
            };
            var C = S;
            t.default = C;
        }).call(this, a("543d").default);
    },
    "86ca": function(e, t, a) {
        a.d(t, "b", function() {
            return n;
        }), a.d(t, "c", function() {
            return i;
        }), a.d(t, "a", function() {});
        var n = function() {
            var e = this, t = (e.$createElement, e._self._c, e.bigCarVehiclesHasState.length), a = e.currentVehicleStdList.length, n = e.bigCarVehiclesHasState.length;
            e.$mp.data = Object.assign({}, {
                $root: {
                    g0: t,
                    g1: a,
                    g2: n
                }
            });
        }, i = [];
    },
    a98b: function(e, t, a) {
        a.r(t);
        var n = a("5cad"), i = a.n(n);
        for (var l in n) [ "default" ].indexOf(l) < 0 && function(e) {
            a.d(t, e, function() {
                return n[e];
            });
        }(l);
        t.default = i.a;
    }
} ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "pages/home/components/vehicle-length-std/index-create-component", {
    "pages/home/components/vehicle-length-std/index-create-component": function(e, t, a) {
        a("543d").createComponent(a("17bc"));
    }
}, [ [ "pages/home/components/vehicle-length-std/index-create-component" ] ] ]);